/*************************************************
* Title：TinyToolKit
* Author：Opportunity 
* Discribe：定义对象池管理器的接口
* CreateTime：2020-04-05 21:33:30
* Version：1.0
* Modify Recoder：
*************************************************/
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

namespace TinyToolKit.ObjectPool
{
    /// <summary>
    /// 对象池管理器
    /// </summary>
    public interface IObjectPoolManager 
    {
        int Count { get; }

        bool HasObjectPool(string poolName); 

        TObjectPool<GameObject> GetObjectPool(string poolName);

        TObjectPool<GameObject> CreateObjectPool(string poolName, int capacity, Func<int, GameObject> factoryFunc, Action<GameObject> destroyFunc);

        bool DestroyObjectPool(string poolName);

        GameObject SpawnObject(string poolName);

        GameObject SpawnObject(string poolName, Vector3 position, Quaternion rotation);

        bool RecycleObject(GameObject obj);
    }
}
